<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$Think.lang.AddMenu}</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    {include file="public/file_css"}
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    <form class="layui-form" id="DataForm" lay-filter="DataForm" action="{:url('menu/ajax')}" method="post" onsubmit="return false">
        <div class="layui-form-item">
            <label class="layui-form-label">{$Think.lang.ParentMenu}</label>
            <input type="hidden" name="id" value="{$data.id}" >
            <div class="layui-input-block">
                <select name="pid" lay-filter="pid" layui.formselect>
                    <option value="0">{$Think.lang.DownSelect}</option>
                    {volist name="tree" id="item"}
                    <option value="{$item.id}" {if $item.id == $data.pid}selected{/if} >{$item.p|raw}{$item.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">{$Think.lang.CategoryName}</label>
            <div class="layui-input-inline">
                <input type="text" name="name" lay-verify="required" lay-reqtext="{$Think.lang.CategoryNameEmpty}" value="{$data.name}" class="layui-input">
            </div>
            <label class="layui-form-label required">{$Think.lang.OrderSort}</label>
            <div class="layui-input-inline">
                <input type="number" name="orderSort" value="{if $data.orderSort}{$data.orderSort}{else}100{/if}" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{$Think.lang.templateList}</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" placeholder="index/list" name="temp_list" value="{$data.temp_list}">
            </div>
            <label class="layui-form-label required">{$Think.lang.templateArticle}</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" placeholder="index/detail" name="temp_archives" value="{$data.temp_archives}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{$Think.lang.LinkAddress}</label>
            <div class="layui-input-block">
                <input type="text" name="outUrl" placeholder="http://www.domain.com" value="{$data.outUrl}" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">{$Think.lang.TarGet}</label>
            <div class="layui-input-block">
                <input type="radio" name="target" value="_self" title="_self" {if $data.target == '_self'}checked{/if}>
                <input type="radio" name="target" value="_blank" title="_blank" {if $data.target == '_blank'}checked{/if}>
                <input type="radio" name="target" value="_parent" title="_parent" {if $data.target == '_parent'}checked{/if}>
                <input type="radio" name="target" value="_top" title="_top" {if $data.target == '_top'}checked{/if}>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">{$Think.lang.IsEnable}</label>
            <div class="layui-input-inline">
                <input type="radio" name="isShow" value="1" title="{$Think.lang.Enable}" {if $data.isShow === 1}checked{/if}>
                <input type="radio" name="isShow" value="0" title="{$Think.lang.Disable}" {if $data.isShow === 0}checked{/if}>
            </div>
            <label class="layui-form-label required">{$Think.lang.isUrl}</label>
            <div class="layui-input-inline">
                <input type="radio" name="isUrl" value="0" title="{$Think.lang.no}" {if $data.isUrl === 0}checked{/if}>
                <input type="radio" name="isUrl" value="1" title="{$Think.lang.yes}" {if $data.isUrl === 1}checked{/if}>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">{$Think.lang.keywords}</label>
            <div class="layui-input-inline">
                <input name="keywords" value="{$data.keywords}" class="layui-input" >
            </div>
            <label class="layui-form-label">{$Think.lang.iconfont}</label>
            <div class="layui-input-inline">
                <input name="iconfont" value="{$data.iconfont}" class="layui-input" >
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">{$Think.lang.description}</label>
            <div class="layui-input-block">
                <textarea name="description" class="layui-textarea" >{$data.description}</textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">{$Think.lang.Remark}</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" >{$data.remark}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="doSubmit">{$Think.lang.Save}</button>
            </div>
        </div>
    </form>

</div>
{include file="public/file_js"}
</body>
</html>